package com.atguigu.eduservice.client;

import com.atguigu.commonutils.ResultInfo;
import com.baomidou.mybatisplus.extension.api.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * ClassName:VodClient
 * Package:com.atguigu.eduservice.client
 * Description:
 *
 * @Date:2021/1/13 14:33
 * @Author:hm
 */

//远程调用接口
@Component
@FeignClient(name="service-vod",fallback = VodFileDegradeFeignClient.class)//调用的服务名称
public interface VodClient {


    //根据视频id删除阿里云视频
    //@PathVariable注解一定要指定参数名称，否则出错
    @DeleteMapping("/eduvod/video/removeAlyVideo/{id}")
    public ResultInfo removeAlyVideo(@PathVariable("id") String id);


    //删除多个阿里云视频的方法
    //参数多个视频id  List videoIdList
    @DeleteMapping("/eduvod/video/delete-batch")
    public ResultInfo deleteBatch(@RequestParam("videoIdList") List<String> videoIdList);

}
